package com.hframe.typefilter;

/**
 * 字符串转数字
 *
 * @author Administrator
 */
public class StringToBoolean implements FilterRef<Boolean, Object> {

    @Override
    public Boolean filter(Object object) throws Exception {
        return Boolean.parseBoolean((String) object);
    }

    public static Boolean parse(String object) {
        try{
            return Boolean.parseBoolean(object);
        }catch (Exception e){
            return null;
        }

    }
}